package com.java.day07.weapons;

/**
 * 武器
 * 1. 英雄战胜boss后，获得了5件武器（随机武器，可能有长剑和匕首），写一个方法用来生成5件随机的武器，返回武器数组。
 * 2. 把武器数组按照长剑和匕首进行分类，把长剑放入长剑数组中，把匕首放入匕首数组中。
 */
public class Weapons {
    //名字
    private String name;
    //攻击力
    private int atack;
    // 耐久
    private int durability = 100;

    public Weapons() {
    }

    public Weapons(String name, int atack, int durability) {
        this.name = name;
        this.atack = atack;
        this.durability = durability;

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAtack() {
        return atack;
    }

    public void setAtack(int atack) {
        this.atack = atack;
    }

    public int getDurability() {
        return durability;
    }

    public void setDurability(int durability) {
        this.durability = durability;
    }


    @Override
    public String toString() {
        return "Weapons{" +
                "name='" + name + '\'' +
                ", atack=" + atack +
                ", durability=" + durability +
                '}';
    }
}
